package com.singer.piping.method;

import com.singer.druid.SingerModify;
import com.singer.piping.Modify;
import java.util.Scanner;

public class ModifySinger {
    static Scanner sr=new Scanner(System.in);
    static Modify se=new SingerModify();
    public void del() throws Exception {
        System.out.println("====修改操作界面====");
        System.out.println("1->歌手修改");
        System.out.println("2->裁判修改");
         int a=sr.nextInt();
        switch (a) {
            case 1:
                singer();
                return;
            case 2:
                judge();
        }
    }

    private static void singer() throws Exception{
        System.out.println("请输入要修改歌手的id:");
        int id1=sr.nextInt();
        System.out.println("请输入修改后的姓名:");
        String names=sr.next();
        System.out.println("请输入修改后的年龄:");
        int ages=sr.nextInt();
        System.out.println("请输入修改后的歌曲:");
        String songs=sr.next();
        se.delete(id1,names,ages,songs);
    }
    private static void judge()throws Exception{
        System.out.println("请输入要修改裁判的id:");
        int id1=sr.nextInt();
        System.out.println("请输入修改后裁判的姓名:");
        String names=sr.next();
        System.out.println("请输入修改后裁判的年龄:");
        int ages=sr.nextInt();
        se.delete1(id1,names,ages);
    }
}
